function usernameRender(){
    const manage = sessionStorage.getItem("manageInfo");
    const user1 = document.querySelector("#user")
    if(sessionStorage.getItem("username")){
        user1.innerHTML = sessionStorage.getItem("username")
    }else{
        user1.innerHTML = (JSON.parse(manage))[0].name
    }
}
usernameRender()

//小头像切换
const avatarSrc = sessionStorage.getItem("avatarSrc")
const smAvatar = document.getElementById("smAvatar")
if(avatarSrc){
    smAvatar.src = avatarSrc
}

//个性签名渲染
const text = document.getElementById("text")
Ajax({
    url:"http://localhost/project/server/signatureRender.php",
    success(msg){
        text.innerHTML = JSON.parse(msg).text
    }
})